import json
import configparser
import yaml
import pandas as pd
import openpyxl


def load_yaml_data(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        data = yaml.safe_load(file)
        return data


def load_excel_data(file_path,sheet_name):
    with open(file_path, 'r', encoding='utf-8') as file:
        df = pd.read_excel(sheet_name)
        return df.to_dict(orient='records')


def load_json_data(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        data = json.dumps(vars(file))
        return data


def load_ini_data(file_path):
    cf = configparser.ConfigParser()
    data = cf.read(file_path)
    return data
